<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<if condition="$type == 1">
				<li class="active"><a href="javascript:;">物流公司日充值统计报表</a></li>
				<li ><a href="{:U('AdminBill/recharge_report',array('type'=>2))}" target="_self"> 物流公司月充值统计报表</a></li>
			<else/>
				<li ><a href="{:U('AdminBill/recharge_report',array('type'=>1))}" target="_self">物流公司日充值统计报表</a></li>
				<li class="active"><a href="javascript:;" > 物流公司月充值统计报表</a></li>
			</if>
		</ul>

		<if condition="$is_manager">
		<form class="well form-search" id="form_search" method="post" action="{:U('AdminBill/recharge_report',array('type'=>$type))}">
			<select name="s_rid">
				<option value="">请选择物流公司</option>
				<foreach name="logistics_list" item="litem">
					<option value="{$litem['id']}" <if condition="$s_rid == $litem['id']">selected</if>>{$litem.logistics_name}</option>
				</foreach>
			</select>
			<if condition="$type == 1">
			<input type="text" name="s_start_time" id="s_start_time" value="<php> echo date('Y-m-d H:i',$s_start_time);</php>" class="js-datetime" placeholder="开始时间" >
			至
			<input type="text" name="s_end_time" id="s_end_time" value="<php> echo date('Y-m-d H:i',$s_end_time);</php>" class="js-datetime" placeholder="结束时间">
			</if>
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:U('AdminBill/recharge_report',array('type'=>$type))}">清空</a>
			<input type="hidden" name="s_download" id="s_download" value="0"/>
			<a class="btn btn-primary" style="float: right;margin-right:15px;margin-bottom:10px;" href="javascript:downloadExcel(1);">导出报表</a>
		</form>
		</if>

		<form class="js-ajax-form" action="" method="post">
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
                        <th>日期</th>
						<th>机构名称	</th>
						<th>账户充值	</th>
						<th>会员卡充值	</th>
						<th>授信总额	</th>
						<th>开卡费	</th>
						<th>账户充值赠送	</th>
						<th>卡片充值赠送	</th>
						<th>退款金额	</th>
						<th>余额	</th>
					</tr>
				</thead>
				<foreach name="list" item="vo">
				<tr>
                    <td><b>{$vo.time}</b></td>
                    <td>{$vo.logistics_name}</td>
					<td><php>echo $vo[2]</php></td>
					<td><php>echo $vo[3]</php></td>
					<td><php>echo $vo[1]</php></td>
					<td><php>echo $vo[4]</php></td>
					<td><php>echo $vo[5]</php></td>
					<td><php>echo $vo[6]</php></td>
					<td><php>echo $vo[7]</php></td>
					<td><php>echo $vo['balance']</php></td>
				</tr>
				</foreach>
			</table>

			<div class="pagination">{$page}</div>

		</form>
	</div>
	<script src="__PUBLIC__/js/common.js?1"></script>
	<script>
		function refersh_window() {
			var refersh_time = getCookie('refersh_time');
			if (refersh_time == 1) {
				window.location = "{:U('AdminBill/index',$formget)}";
			}
		}

	</script>
</body>
</html>